<!DOCTYPE html>
<html lang="zh_CN">

	<head>
		<title>任一门企业后台</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="chrome=1,IE=edge" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta name="keywords" content="任一门后台">
		<meta name="description" content="任一门后台">
		<link rel="shortcut icon" href="/favicon.png">
		<link rel="stylesheet" href="/static/admin/css/style.css" />
		<link rel="stylesheet" href="/static/admin/css/bootstrap.min.css" />
		<load href="/static/admin/css/bootstrap.min.css,/static/admin/font-awesome/css/font-awesome.css?v=1.7,/static/admin/css/animate.css?v=1.7," /} <load href="/static/admin/js/jquery-2.1.1.min.js" />
		<js href="/static/admin/js/plugins/layer/layer.js" />
		<css href="/static/admin/css/style.css" />
		<css href="/static/admin/js/layer/skin/layer.css" />

	</head>

	<!--<body class="img_bg" oncontextmenu="return false" onselectstart="return false"
ondragstart="return false" onbeforecopy="return false" oncopy=document.selection.empty() onselect=document.selection.empty()>-->

	<body class="img_bg" style="overflow: hidden;">
		<div class="box_logo">
			<div class="logo_img"><span> <img alt="image" src="/static/admin/images/logo_d.png" style="margin-top:3px;"
									   width="155px" height="41px"></span></div>
		</div>
		<div id="backgroundImage">
			<img src="/static/admin/images/bg_login.png" alt="Cinque Terre" class="img-responsive"/>
		</div>
		<!--[if lte IE 9]>
<div id="warning_info" class="text-warning fade in mb_0">
	<button data-dismiss="alert" class="close" type="button">×</button>
	<strong>您正在使用低版本浏览器，</strong> 在本页面的显示效果可能有差异。
	建议您升级到
	<a href="http://www.google.cn/intl/zh-CN/chrome/" target="_blank">Chrome</a>
	或以下浏览器：
	<a href="http://se.360.cn/‎" target="_blank">360</a> /
	<a href="http://www.mozilla.org/en-US/firefox/‎" target="_blank">Firefox</a> /
	<a href="http://www.apple.com.cn/safari/" target="_blank">Safari</a> /
	<a href="http://windows.microsoft.com/en-us/internet-explorer/download-ie" target="_blank">
		Internet Explorer 10+</a>
</div>
<![endif]-->
		<div class="middle-box loginscreen  animated bounceIn ibox">
			<div class="ibox-content">
				<h3 class="text-center" style="color: #4d4d4d;">欢迎登陆官网后台</h3>
				<div id="DownQRCode" style="display:none"></div>
				<form class="form-horizontal m-t" role="form" method="post" id="loginform">
					<div class="form-group">
						<label class="col-sm-3 control-label">用户名：</label>
						<div class="col-sm-9">
							<input id="j_username" name="username" minlength="2" type="text" class="form-control" placeholder="请输入用户名" required="" aria-required="true">
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">密&nbsp&nbsp&nbsp&nbsp码：</label>
						<div class="col-sm-9">
							<input id="j_password" name="password" minlength="6" type="password" class="form-control" placeholder="请输入密码" required="" aria-required="true">
						</div>

					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">验证码：</label>
						<div class="col-sm-4">
							<input type="text" class="form-control" id="j_verify" style="width: 110px;text-transform: uppercase;ime-mode:Disabled" name="verify" placeholder="请输入验证码" maxlength="4" required="" onkeyup="value=value.replace(/[\W]/g,'') " onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))">
						</div>
						<div class="col-sm-5">
						<!--	{:captcha_img()}-->
							<img id="imgVerify" src="{:url('login/verify')}" class="verify" style="cursor: pointer" />
						</div>

					</div>
					<div>
						<label class="control-label">&nbsp&nbsp<input
						type="checkbox" class="i-checks" id="j_remember" value="true">记住登录
				</label>
					</div>

					<button id="login_ok" type="button" class="btn btn-success block full-width m-b" style="margin-top: 10px;">登 录</button>

				</form>
			</div>
		</div>

		<script src="/static/admin/js/jquery.cookie.js"></script>
		<script type="text/javascript">
			var COOKIE_NAME = 'gsms__username';
			$(function() {
				if($.cookie(COOKIE_NAME)) {
					$("#j_username").val($.cookie(COOKIE_NAME));
					$("#j_password").focus();
					$("#j_remember").attr('checked', true);
				} else {
					$("#j_username").focus();
				}
			});
			//验证码切换
			$("#imgVerify").on('click',function() {
					$("#imgVerify").attr("src","{:url('login/verify')}" + "?" +(Math.floor(Math.random(100) * 10)));
				});
				$("#login_ok").click(function(){
					$(this).attr("disabled", true).val('登录中...');
					$.ajax({
						type:'post',
						url: '',
						data: {
							username: $("#j_username").val(),
							password: $("#j_password").val(),
							verify: $("#j_verify").val()
						},
						dataType: "json",
						beforeSend: function() {
							layerIndex = layer.load('正在校对账号密码信息，请稍候...', 3);
						},
						success: function(result) {
							layer.close(layerIndex);
							if(result.code==0) {
								layer.msg(result.msg);
								$(".verify").click();
								$("#login_ok").attr("disabled", false).val('登录');
							} else {
								$(".animated").removeClass("bounceIn");
								$(".animated").addClass("bounceOut");
								setTimeout("location.href='" + result.url + "'", 500);
								layer.load('账号密码正确，正在跳转后台', 1);
							}
						},
						error: function(XMLHttpRequest, textStatus, errorThrown) {
							layer.close(layerIndex);
							layer.msg(textStatus);
							$(".verify").click();
							$("#login_ok").attr("disabled", false).val('登录');
						}
					});
					return false;
				});


		</script>
	</body>

</html>